
package py.una.pol.raphapy.autoventas.model;

import java.io.Serializable;
import java.math.BigDecimal;
import java.util.Date;
import javax.persistence.Basic;
import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.GeneratedValue;
import javax.persistence.GenerationType;
import javax.persistence.Id;
import javax.persistence.NamedQueries;
import javax.persistence.NamedQuery;
import javax.persistence.Table;
import javax.persistence.Temporal;
import javax.persistence.TemporalType;
import javax.validation.constraints.NotNull;
import javax.validation.constraints.Size;
import javax.xml.bind.annotation.XmlRootElement;

/**
 *
 * @author Rafael E. Benegas
 */
@Entity
@Table(name = "mensaje_entrante")
@XmlRootElement
@NamedQueries({
    @NamedQuery(name = "MensajeEntrante.findAll", query = "SELECT m FROM MensajeEntrante m"),
    @NamedQuery(name = "MensajeEntrante.findByCodMenEnt", query = "SELECT m FROM MensajeEntrante m WHERE m.codMenEnt = :codMenEnt"),
    @NamedQuery(name = "MensajeEntrante.findBySms", query = "SELECT m FROM MensajeEntrante m WHERE m.sms = :sms"),
    @NamedQuery(name = "MensajeEntrante.findByFecMenEnt", query = "SELECT m FROM MensajeEntrante m WHERE m.fecMenEnt = :fecMenEnt"),
    @NamedQuery(name = "MensajeEntrante.findByFecProMenEnt", query = "SELECT m FROM MensajeEntrante m WHERE m.fecProMenEnt = :fecProMenEnt"),
    @NamedQuery(name = "MensajeEntrante.findByNumOri", query = "SELECT m FROM MensajeEntrante m WHERE m.numOri = :numOri")})
public class MensajeEntrante implements Serializable {
    private static final long serialVersionUID = 1L;
    // @Max(value=?)  @Min(value=?)//if you know range of your decimal fields consider using these annotations to enforce field validation
    @Id
    @GeneratedValue(strategy = GenerationType.IDENTITY)
    @Basic(optional = false)
    @Column(name = "cod_men_ent")
    private BigDecimal codMenEnt;
    @Basic(optional = false)
    @NotNull
    @Size(min = 1, max = 1000)
    @Column(name = "sms")
    private String sms;
    @Basic(optional = false)
    @NotNull
    @Column(name = "fec_men_ent")
    @Temporal(TemporalType.TIMESTAMP)
    private Date fecMenEnt;
    @Column(name = "fec_pro_men_ent")
    @Temporal(TemporalType.TIMESTAMP)
    private Date fecProMenEnt;
    @Basic(optional = false)
    @NotNull
    @Size(min = 1, max = 15)
    @Column(name = "num_ori")
    private String numOri;

    public MensajeEntrante() {
    }

    public MensajeEntrante(BigDecimal codMenEnt) {
        this.codMenEnt = codMenEnt;
    }

    public MensajeEntrante(BigDecimal codMenEnt, String sms, Date fecMenEnt, String numOri) {
        this.codMenEnt = codMenEnt;
        this.sms = sms;
        this.fecMenEnt = fecMenEnt;
        this.numOri = numOri;
    }

    public BigDecimal getCodMenEnt() {
        return codMenEnt;
    }

    public void setCodMenEnt(BigDecimal codMenEnt) {
        this.codMenEnt = codMenEnt;
    }

    public String getSms() {
        return sms;
    }

    public void setSms(String sms) {
        this.sms = sms;
    }

    public Date getFecMenEnt() {
        return fecMenEnt;
    }

    public void setFecMenEnt(Date fecMenEnt) {
        this.fecMenEnt = fecMenEnt;
    }

    public Date getFecProMenEnt() {
        return fecProMenEnt;
    }

    public void setFecProMenEnt(Date fecProMenEnt) {
        this.fecProMenEnt = fecProMenEnt;
    }

    public String getNumOri() {
        return numOri;
    }

    public void setNumOri(String numOri) {
        this.numOri = numOri;
    }

    @Override
    public int hashCode() {
        int hash = 0;
        hash += (codMenEnt != null ? codMenEnt.hashCode() : 0);
        return hash;
    }

    @Override
    public boolean equals(Object object) {
        
        if (!(object instanceof MensajeEntrante)) {
            return false;
        }
        MensajeEntrante other = (MensajeEntrante) object;
        if ((this.codMenEnt == null && other.codMenEnt != null) || (this.codMenEnt != null && !this.codMenEnt.equals(other.codMenEnt))) {
            return false;
        }
        return true;
    }

    @Override
    public String toString() {
        return "py.una.pol.raphapy.autoventas.model.MensajeEntrante[ codMenEnt=" + codMenEnt + " ]";
    }
    
}
